package svc

import (
	"github.com/zeromicro/go-zero/zrpc"

	"2106A-zg6/baidu/gateway/internal/config"
	"2106A-zg6/baidu/srv/baiduclient"
)

type ServiceContext struct {
	Config   config.Config
	BaiduSrv baiduclient.Baidu
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:   c,
		BaiduSrv: baiduclient.NewBaidu(zrpc.MustNewClient(c.BaiduSrv)),
	}
}
